<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>S6办公系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
function fun(){
	
	var p =document.getElementById('pa').value;
	var title =document.getElementById("title").value.length;
	if(p<=0&&title<=0){
		alert('标题或内容不能为空');
		}else if(p<=0){
		alert('内容不能为空');
		}else if(title<=0){
			alert('标题不能为空');
			}

	}
</script>
</head>

<body style="background-color:#D6D3C9;">
<table>
<tr>
<td>标题：</td>
<td><input type="text" id="title" /></td>
</tr>
<tr>
<td>发布人：</td>
<td><p>部门经理</p></td>
</tr>
<tr>
<td>公告范围:</td>
<td> <select  >
<option value="0"  >开发部</option>
<option value="1" selected="selected">全公司</option>
<option value="2">财务部</option>
</select> </td>
</tr>
<tr>
<td>内容：</td>
<td><textarea rows="5" cols="20" id="pa"></textarea></td>
</tr>
<tr>

<tr>
<td colspan="2"><input type="button" value="发布" onclick="fun()" /></td>
</tr>
</table>
</body>
</html>